﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
using DAL;
using BLL;

public partial class Plublic_Report : System.Web.UI.Page
{
    String StrConn = WebConfigurationManager.ConnectionStrings["conn"].ConnectionString.ToString();
    TransactionHandler objTransactionHandler = new TransactionHandler();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.BindDataGridView();
        }
    }

    protected void BindDataGridView()
    {
        List<Transaction> lstTransaction = new List<Transaction>();

        lstTransaction = objTransactionHandler.GetTransactionList(StrConn);

        GridViewReport.DataSource = lstTransaction;
        GridViewReport.DataBind();

    }
}